const mongoose = require('mongoose')

module.exports = function (app) {
  mongoose.connect(app.get('mongodb'), {
    auto_reconnect: true,
    poolSize: 10
  })
  mongoose.Promise = global.Promise

  app.set('mongooseClient', mongoose)
}
